[CODEC-249] Fix Incorrect transform of CH digraph according Metaphone basic rules#423
Conversation
|
Hello @Shalujha0907 Thank you for the PR! I see this PR changes the expectation for |
Hello @garydgregory Thanks for the review and for calling this out. XRKTR is the full phonetic sequence, but Metaphone in Commons Codec uses a default maxCodeLen of 4, so the returned value is truncated to XRKT. Please let me know if you think we should also add a separate assertion with a higher maxCodeLen to make that behavior explicit. |
|
Hi @Shalujha0907 |
… code length of 5
Hi @garydgregory Thank you! |
|
Jira ticket is https://issues.apache.org/jira/browse/CODEC-249 |
Incorrect transformation of the CH digraph in the Metaphone algorithm
This PR fixes the above issue.
Previously, we checked whether the character following CH was a vowel; if so, we appended the character "K". I have removed that check so that when "CH" is encountered, the algorithm simply appends "X".